<?php

namespace App\Http\Controllers;

use App\Models\Campus;
use App\Models\Packages;
use App\Models\Staffs;
use App\Models\Users;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;

class CampusController extends Controller
{
    public function index(){
        $campus = Campus::all();
        $json = [];
        foreach ($campus as $value) {
            $json[] = [
                'id' => $value->id,
                'name' => $value->name,
            ];
        }
        return $this->returnJson($json);
    }
}
